<template>
    <div>
        <el-switch v-model="modelValue.variableValue" :disabled="propJson.isDisable"/>
    </div>
</template>

<script setup lang="ts" name="SwitchComponent">
import {computed, defineProps} from "vue";
import {getCommonParamObj} from "@/utils/commonParamUtil.ts";

let props = defineProps(['propJson', 'commonParam']);

let propJson = computed(() => {return props['propJson']})
let commonParam = computed(() => {return props['commonParam']})

let modelValue = computed(() => {
    let bindVariable= propJson.value.bindVariable;
    // 获取全局变量中的值
    return getCommonParamObj(commonParam.value, bindVariable)
})
</script>

<style scoped lang="less">

</style>